package com.iterator.iterator;

import java.util.ArrayList;

public class Test {
    public static void main(String[] args) {
        //学院的集合
        ArrayList<College> colleges =new ArrayList();
        //初始化计算机学院
        ComputerCollege computerCollege = new ComputerCollege();
        //给计算机学院添加系
        computerCollege.addDepartment("shell" , "shell");
        colleges.add(computerCollege);

        //初始化信息工程学院
        InfoCollege infoCollege = new InfoCollege();
        infoCollege.addDepartment("计科","计算机科学");
        colleges.add(infoCollege);

        OutputImpl output = new OutputImpl(colleges);
        output.printCollege();

    }
}
